<!--
 * @Author: ZhaoZhiqi
 * @Date: 2022-10-24 14:36:30
 * @LastEditors: ZhaoZhiqi
 * @LastEditTime: 2023-10-13 16:34:07
 * @Description: 招投标投诉指南
 * @FilePath: \tuanfeng-mini\src\pages\bidding_complaint_guide.vue
-->
<template>
    <div class="container">
        <div class="item" v-for="item in list">
            <template v-if="item.typeId !== 7">
                <div class="title">{{item.typeName}}</div>
                <div class="content" v-html="item.content"></div>
            </template>
            <template v-else>
                <div class="title">附件</div>
                <div class="file" @click="toPage('pages/webview', { url: item.content, title: item.fileName })">
                    <img src="https://tuanfeng.whkxzj.com/profile/static/20230109160604-pdf.png" alt />
                    <div class="name">{{item.fileName}}</div>
                </div>
            </template>
        </div>
    </div>
</template>
<script>
import { getBidCompGuideAPI } from "../api/bidding";
export default {
    data() {
        return {
            list: [],
        };
    },
    onShareAppMessage() {},
    onLoad() {
        getBidCompGuideAPI().then((res) => {
            this.list = res.data;
        });
    },
    methods: {
        toPage(url, params) {
            this.$u.route({
                url,
                params,
            });
        },
    },
};
</script>
<style scoped lang="scss">
.container {
    padding: 15px;
    .item {
        margin-bottom: 10px;
        .title {
            font-size: 17px;
            line-height: 32px;
            font-weight: bold;
            margin-bottom: 3px;
        }
        .content {
            font-size: 15px;
            line-height: 26px;
            white-space: pre-wrap;
        }
        .file {
            width: 60px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            img {
                width: 45px;
                height: 45px;
                margin-bottom: 5px;
            }
            .name {
                width: 60px;
                font-size: 12px;
            }
        }
    }
}
</style>